home *** CD-ROM | disk | FTP | other *** search
/ Power Tools 1993 November - Disc 1 / Power Tools Plus (Disc 1 of 2)(November 1993)(HP).iso / sys / mpwp / mpwp.txt < prev    next >
Encoding:
Text File  |  1992-04-30  |  24.4 KB  |  413 lines

  1. Multiprocessing White Paper
  2.   Introduction
  3. Today's users of computer systems have been demanding more and more
  4. power. To accommodate this need, computer vendors have been pushing the
  5. technology limits of hardware and have turned to RISC systems due to
  6. their superior performance. But some application environments require
  7. still more power than is available from single processor systems.
  8. Multiprocessor systems have thus been developed to provide a further
  9. performance boost.
  10.    The idea behind multiprocessing is simple. If one processor does not
  11. provide enough performance, then add additional processors.
  12. Multiprocessing (MP) systems let users reach high performance levels
  13. without waiting for next generation CPUs, while at the same time
  14. leveraging existing hardware. The challenge of multiprocessing (MP)
  15. systems is ensuring applications are able to take advantage of the full
  16. performance available to them from additional processors.
  17.    MP systems have been available for a number of years. IBM mainframes
  18. since the late 1960s have used multiprocessing to provide a range of
  19. different performance levels. HP also implemented multiprocessing in the
  20. early 1980s with its line of UNIX workstations. Just as minicomputers
  21. are moving into mainframe levels of performance, multiprocessing is
  22. moving more and more from proprietary environments into the open
  23. environment of UNIX. Figure 1 shows how HP's rapid performance growth of
  24. PA-RISC systems has been enhanced with the extra performance levels
  25. available with MP. The availability of UNIX MP systems is an exciting
  26. development because it means that users and businesses will not just
  27. have the advantage of using open systems, but will also have the power
  28. needed for the most demanding environments.
  29.  
  30. [Figure 1:  Illustration:  Series 800 Performance Growth]
  31.  
  32. Definition of Multiprocessing
  33. Multiprocessing is a design where many CPUs are connected to provide
  34. additional computing power to allow many tasks to run in parallel. This
  35. is more than multitasking. Multitasking systems allow many jobs or
  36. processes to be running on a system, rather than running each job
  37. serially to completion. However, that does not mean that at any one
  38. moment that all jobs are running. For example, figure 2 shows how a
  39. single CPU system parses out CPU time to multiple jobs and switches
  40. between running jobs. If the CPU switches between jobs quickly, it gives
  41. a user the appearance that many jobs are indeed running simultaneously,
  42. even though in actuality only one job is running at a time. For
  43. multiprocessing systems, figure 2 shows that each CPU continues to
  44. switch between running jobs, but now jobs are truly running in parallel
  45. with jobs running on each CPU (of course each individual CPU continues
  46. to multitask).
  47.  
  48. [Figure 2:  Illustration:  Job Scheduling]
  49.  
  50. Multiprocessing also means more than having a multiuser or timeshare
  51. system. As with multitasking, a system with a single CPU can switch
  52. between jobs for different users and, if it has the performance to
  53. switch quickly enough, gives each user the appearance that they have a
  54. dedicated computer at the other end of their display. A multiprocessor
  55. system essentially provides more CPU resources that can thus be shared
  56. simultaneously by many users without a drop in response time.
  57.    Another common misconception with MP systems is that they are Fault
  58. Tolerant systems. While Fault Tolerant systems do have multiple CPUs as
  59. figure 3 shows for the HP 9000 Series 1200 systems, they also have fully
  60. redundant hardware for system buses, memory, I/O and peripherals and
  61. power supply. This redundancy protects Fault Tolerant systems from
  62. unplanned downtime due to any one hardware component going down.
  63. However, MP systems can take advantage of the additional CPUs to ensure
  64. continued operation if one CPU fails. For example, if a CPU failure in
  65. the HP 9000 Series 890S MP Corporate Business Server system causes the
  66. system to go down, the HP 890S will bring itself down and then boot up
  67. again with the faulty CPU reconfigured out of the system. The HP 890S
  68. will continue to run at a reduced performance level until the CPU board
  69. can be repaired or replaced.
  70.  
  71. [Figure 3:  Illustration:  HP 9000 Series 1200 Fault Tolerant System]
  72.  
  73. Building an MP system requires more than just adding additional CPU
  74. boards to a system. In actuality, there is a continuum of
  75. multiprocessing systems from loosely coupled machines on a network to
  76. multiple CPUs in one system acting as if there was only one CPU in the
  77. machine. The key measure of MP systems is how transparent the
  78. implementation is to users and programmers and also how well the
  79. additional power of the extra CPUs is utilized.
  80.  
  81. Types of Multiprocessing Systems
  82. Several terms have been suggested to help describe different types of
  83. computer systems and provide a useful framework for understanding
  84. multiprocessing systems in relation to other types of systems. Computers
  85. can be grouped into 3 classes:
  86.    SISD (single instruction, single data stream). A SISD machine is a
  87. typical single CPU system where one CPU executes one instruction and
  88. works on one piece of data at any one time.
  89.    SIMD (single instruction, multiple data stream). One example of a
  90. SIMD machine is a vector processor, where an array of data is input into
  91. several registers and then the same operation (eg. multiply by pi) is
  92. performed on all the data simultaneously. SIMD machines are mostly used
  93. for scientific and engineering applications where intense numeric
  94. computations and simulations are needed.
  95.    MIMD (multiple instructions, multiple data stream). This is where
  96. many CPUs execute different instructions on different pieces of data.
  97. However, MIMD systems differ on how instructions and data are shared
  98. between each CPU and how much each CPU interacts with the other CPUs.
  99.    Multiprocessing computer systems are MIMD machines with the CPUs in
  100. one system sharing all the system resources such as memory, I/O and
  101. buses. There are two main types of multiprocessing systems in use today,
  102. asymmetric and symmetric.
  103.    Figure 4 shows an asymmetric multiprocessing system found in several
  104. graphic workstations. Even though there are two processors in the
  105. system, they are not equal. The main processor runs the operating system
  106. and user programs, accesses the main memory, and also controls the
  107. actions of the attached graphics processor. The attached graphics
  108. processor handles the displaying and updating of the graphical display,
  109. but does not actually modify any of the data in the main memory nor does
  110. it execute any user programs. The attached processor does improve the
  111. performance of the overall system, because the main processor does not
  112. need to spend its resources on the graphical display, but it does not
  113. provide a user with the full power of the two processors.
  114.  
  115. [Figure 4:  Illustration:  Graphics Workstation]
  116.  
  117. Asymmetric multiprocessing systems are relatively easy to implement
  118. because less modifications need to be done to an operating system,
  119. memory bus structures and I/O. However, asymmetric systems have a
  120. potential performance bottleneck with the main processor. Figure 5 shows
  121. an expanded asymmetric system where there is also an attached vector
  122. processor and floating point processor, in addition to a graphics
  123. processor. The three attached processors are controlled by the main
  124. processor and can thus sit idle if the main processor becomes busy.
  125. Asymmetric processors are best suited for special tasks such as heavy
  126. numeric calculations or simulations where the system can be tailored for
  127. the specific task at hand.
  128.  
  129. [Figure 5:  Illustration:  Graphics Workstation]
  130.  
  131. In symmetric multiprocessing, all processors are equal and are not
  132. specialized for specific tasks. Figure 6 shows the HP 890S symmetric
  133. multiprocessing system where each processor can access memory, I/O and
  134. other parts of the system. The operating system and hardware components
  135. need to maintain data consistency, job scheduling and message passing
  136. between processors. There are two main implementations of symmetric
  137. multiprocessing: master/slave and fully symmetric. While the hardware
  138. may be symmetric, the differences between these two implementations are
  139. mainly in how the operating system handles two main tasks: job
  140. scheduling and kernel access.
  141.  
  142. [Figure 6:  Illustration:  HP 890S Multiporcessing System]
  143.  
  144. The job scheduling algorithm determines how jobs are parsed out and
  145. scheduled to each processor and is a major factor in overall
  146. multiprocessor performance. Figure 7 shows the job scheduling for
  147. master/slave systems, where one processor (master) assigns jobs to the
  148. other processors (slaves). In fully symmetric systems, each processor
  149. receives the next job that is waiting in a global system queue.
  150.  
  151. [Figure 7:  Illustration:  Job Scheduling]
  152.  
  153. To show how the two scheduling routines work, think of waiting for the
  154. next available cashier at a store. In a master/slave store, one of the
  155. cashiers has the responsibility of assigning customers to the next
  156. available cashier. If the master cashier is busy when one of the slave
  157. cashiers signals that they are ready for another customer, there will be
  158. a delay before a customer is sent to the slave cashier, slowing down the
  159. overall throughput. Or this store might modify the routine slightly and
  160. have the master cashier assign an incoming customer straight away to one
  161. cashier. However, if for some reason there is a holdup at one of the
  162. cashiers (because of some pricing difficulties), then all the other
  163. customers in line for that cashier are stuck, even though other cashier
  164. lines continue to move quickly. Either way, overall throughput is
  165. lowered as the master cashier (processor) must spend time assigning and
  166. possibly reassigning customers (jobs) to the other slave cashiers
  167. (processors). Also, individual customers (jobs) may find that they may
  168. have to wait much longer than other customers before they are serviced
  169. by a cashier (processor), just because they were assigned to a slow line
  170. to begin with.
  171.    In contrast, in a store that implements a fully symmetric system, no
  172. one cashier assigns customers to the other cashiers. All incoming
  173. customers line up in one queue and when they get to the head of the
  174. line, they go immediately to the next available cashier. The advantage
  175. is that no extra time nor resources are spent allocating customers
  176. (jobs) to specific cashiers (processors) and that any queued customer
  177. (job) is more likely to be serviced in a timely fashion.
  178.    Kernel access, or the lack of access, can also hinder multiprocessor
  179. performance. As figure 8 shows, some implementations of master/slave
  180. systems limit the execution of the UNIX kernel (the operating system
  181. core) and access to I/O to only the master processor, further pinching
  182. the master processor bottleneck. Examples of master/slave
  183. multiprocessing can be seen in systems from SUN and Solbourne. These
  184. type of systems are best suited to environments that have little I/O
  185. activity or have intensive numerical tasks that can be easily scheduled.
  186. In a heavy multiuser environment, users of master/slave symmetric
  187. multiprocessing systems (while gaining some improvement) will fail to
  188. see the extra performance promised from additional processors as the
  189. extra processors will spend more and more time waiting for kernel or I/O
  190. requests to be filled by the master processor.
  191.  
  192. [Figure 8:  Illustration:  Kernel and I/O Access]
  193.  
  194. Fully symmetric multiprocessing systems, such as the HP 890S, are more
  195. difficult to implement, but are better suited to heavy multiuser or I/O
  196. intensive environments, such as OLTP and RDBMS applications. Each
  197. processor is an equal to other processors and so can access I/O or the
  198. UNIX kernel, instead of sending all such requests to a master processor
  199. and then waiting for service. In general, SMP systems provide better
  200. scaling for commercial environments, such as Online Transaction
  201. Processing (OLTP) applications. Mixed workloads would also work best on
  202. a SMP system, because they would be most likely to have a high amount of
  203. I/O and kernel calls.
  204.  
  205. Application fit with Multiprocessing
  206. Applications that appear to the UNIX system as just one large process
  207. would most likely not run faster on a multiprocessing system. Such
  208. applications are called single threaded and typically can not be split
  209. up among multiple processors. Large batch jobs, common in commercial
  210. environments, is one example of a single threaded application. In order
  211. to be split up over multiple processors, a single threaded application
  212. needs to be either "broken up" explicitly into multiple threads or
  213. processes, or implicitly broken up with the help of special parallel
  214. compilers. However, general purpose parallel compilers are still not
  215. available for the commercial marketplace. For today, large batch
  216. applications would run best on SMP systems where each individual
  217. processor has high performance, rather than a SMP system using many
  218. lower performance processors. The balance between batch jobs and mixed
  219. applications (such as OLTP) is one of the reasons that the HP 890S
  220. multiprocessing system was implemented with high performance
  221. uniprocessors, rather than with several more lower performance
  222. uniprocessors. The HP 890S offers the fastest combined batch and OLTP
  223. system performance due to its fast individual processors.
  224.    RDBMS applications can also be tuned explicitly for MP systems for
  225. increase OLTP performance. HP has and continues to work closely with key
  226. industry leading RDBMS solution providers to optimize their applications
  227. specifically for the HP 890S MP system.
  228.    Multiprocessing Challenges
  229. A fully symmetric multiprocessing system needs to overcome several
  230. hurdles without compromising the performance potential of additional
  231. processors. The main challenges are ensuring data integrity, job
  232. scheduling, I/O and kernel access, and application transparency. The
  233. fully symmetric multiprocessing implementation of the HP 890S will be
  234. used as an example of how these multiprocessing design challenges have
  235. been meet.
  236.  
  237. Ensuring Data Integrity
  238. As seen in figure 6, the HP 890S is a tightly coupled system with all
  239. processors sharing the same memory. It is very likely that different
  240. jobs running on different processors will need to access the same memory
  241. locations, and thus the system must ensure that data integrity is
  242. maintained at all times with little or no contention. The HP 890S solves
  243. this problem in hardware with a "snoopy" cache protocol. All processors
  244. have their own local cache and memory controllers, and manipulate data
  245. in memory through their caches. Processors can either share cache lines,
  246. or mark lines as private. Each memory controller listens to every
  247. transaction on the System Memory Bus (SMB) (or "snoops," leading to the
  248. snoopy term) and act as needed to maintain data integrity. For example,
  249. if processor A and B share a cache line, but now processor A needs to
  250. write to the shared line, A broadcasts the write and marks the cache
  251. line as private.  In the meantime, processor B picks up the write
  252. request and thus marks its copy of the cache line as invalid, leaving
  253. the modified line on processor A as the only valid copy. The HP 890S
  254. also avoids another potential bottleneck due to the extra traffic on the
  255. SMB. The SMB has a bandwidth of 800 MB/s, ensuring that bus contention
  256. will not occur between the processors and thus will not decrease
  257. performance.
  258.  
  259. Job Scheduling
  260. A fully symmetric MP system has already been shown in figure 7 to use a
  261. single job queue for all processors. The next waiting job is sent to the
  262. next available processor. While a single job queue is an efficient MP
  263. scheduling method in general because of its inherent dynamic load
  264. balancing, it can be made more efficient by recognizing that not all
  265. jobs finish after one run on a processor. Often jobs or processes are
  266. scheduled to run for some length of time and are then swapped out and
  267. placed back in the job queue while another job is swapped in. However, a
  268. process builds up local data structures on the processor that it runs on
  269. (such as data into cache). If that process is later scheduled to run on
  270. another processor, then the second processor must spend time rebuilding
  271. the same data structures that are resident on the first processor. The
  272. HP 890S removes this potential source of inefficiency by using a
  273. heuristic scheduling algorithm where each process develops an affinity
  274. to one particular processor, but can move to another processor if needed
  275. for load balancing. To understand this heuristic scheduling method,
  276. imagine a process is handled the same way as a person who constantly
  277. checks in and out of a hotel. If the hotel kept checking this person
  278. into the same room, then some of the person's baggage could remain in
  279. the room when the person wasn't in (assuming of course that everyone
  280. else has the courtesy to leave it alone), making it very easy and quick
  281. for this person (and the hotel) to check back in. If it was necessary to
  282. move to another room, or if this person was not coming back, only then
  283. would the effort be spent to pack up all this person's belongings and
  284. move them.
  285.  
  286. Kernel Access
  287. In order to maximize performance, the HP 890S allows multiple processes
  288. to be executed in the UNIX kernel at the same time. Without this
  289. capability, it is very likely that processors could sit idle while they
  290. wait for access to the kernel. The HP-UX kernel data structures are
  291. broken up into several pieces with synchronization variables called
  292. semaphores used to protect each block of data structures. A processor
  293. must lock the appropriate semaphore before they can access the desired
  294. kernel section. If another processor previously locked the semaphore,
  295. then the requesting processor must wait until the semaphore is unlocked.
  296. Kernel contention is reduced by having each semaphore lock only a small
  297. part of the kernel. The kernel semaphores also ensure that no I/O
  298. collisions occur between different processors. This is in contrast to
  299. master/slave systems where the UNIX kernel only runs on the master
  300. processor, thus there is no need to add semaphores to the kernel. This
  301. is one reason why master/slave systems are easier to implement.
  302.  
  303. Application Transparency
  304. Multiprocessor systems should ideally be transparent to applications,
  305. meaning that an application can run on single processor or
  306. multiprocessor systems without any modification. For most applications,
  307. this will be the case for the HP 890S. The HP-UX system call interfaces
  308. for the multiprocessor systems are the same as for a single processor
  309. system. Applications that are structured as a set of cooperating
  310. processes may experience some problems in a multiprocessor system
  311. because processes may not execute in the same order as in a single
  312. processor system. These applications should be tested to identify any
  313. potential timing problems.
  314.  
  315. Future Multiprocessing Trends
  316. Many system vendors will continue to refine their multiprocessing
  317. offerings. Several vendors such as HP will incorporate advanced
  318. technology for improved multiprocessor performance.
  319.    HP will continue to enhance its multiprocessing offering. Presently
  320. HP offers a 4-way multiprocessor system with the HP 890S Corporate
  321. Business Server. The HP 890S will be increased into an 8-way and then
  322. later a 16-way multiprocessing system. In order to support these higher
  323. levels of multiprocessing, HP will break up the HP-UX kernel into
  324. smaller pieces to allow for increased simultaneous access by many more
  325. CPUs. Each kernel piece and data structure will continue to be protected
  326. with semaphores.
  327.    HP-UX will also support multiple threads in the kernel. Threads are
  328. special light-weight UNIX processes. Traditional UNIX processes (called
  329. a task) can not be broken down into smaller units. If a UNIX system
  330. needs to start a new task, it does so with some overhead. With threads,
  331. a new process can be started with a thread with less overhead (by doing
  332. things such as sharing the same address space and common memory),
  333. leading to increased performance. Also, tasks can be broken down into
  334. several related threads, leading to a higher level of granularity.
  335. Having this increased granularity will lead to improved multiprocessor
  336. performance because of parallelization inherent with threads. HP-UX will
  337. also implement a communication mechanism called ports as a way for
  338. threads to know about each other, to talk to one another and to
  339. synchronize related threads. Support for threads will be added first for
  340. user applications and then for the HP-UX kernel. With these
  341. enhancements, the HP 890S will continue to offer significant performance
  342. increases over the next few years.
  343.  
  344. Massively Parallel Systems
  345. Much attention has been given to research on massively parallel
  346. multiprocessor systems. Figure 9 shows that while the hardware
  347. implementation is straight forward and the potential performance gains
  348. quite large, the software needed to split up processes, coordinate them
  349. and maintain data consistency is not straight forward. SMP systems like
  350. the HP 890S are extensions of single processor systems with a common bus
  351. to easily share and maintain consistency of a common memory. An SMP
  352. software environment is very similar, if not identical, to a single
  353. processor software environment, with the benefit of existing
  354. applications running without modification. In contrast, applications
  355. will still have to be written specifically for massively parallel
  356. systems. Applications such as complex numeric simulations (eg. airflow
  357. analysis for the space shuttle) that can easily be broken down into
  358. individual and well defined subprocesses will continue to be the best
  359. fit for massively parallel systems. For commercial applications, special
  360. parallel compilers and development tools that would automatically break
  361. up applications while maintaining data consistency still need to be
  362. developed. While progress is being made in this area, general purpose
  363. parallel compilers are still estimated to be years away.
  364.  
  365. [Figure 9:  Illustration: Massively Parallel System]
  366.  
  367. Distributed Computing
  368. In many respects, there are similarities between massively parallel
  369. multiprocessing systems and computer environments made up of multiple
  370. computers connected by a high-speed network, often called a
  371. multicomputer. Figure 10 shows that a multicomputer consists of
  372. distributed systems (with their own private memories) connected
  373. together, executing processes in parallel, and using messages to
  374. synchronize and maintain data consistency. In order to provide a
  375. standards-based framework for multicomputers (or distributed computing),
  376. the Open Software Foundation (OSF) has developed the Distributed
  377. Computer Environment (DCE) specification. DCE provides a common
  378. framework for sending process requests over a network and also a
  379. distributed file system that can be shared by many computers. With DCE,
  380. a large application can be written into several parts that can then be
  381. parsed out to several computers on the network using Remote Procedure
  382. Calls (RPC). Each computer works in parallel on its portion, with the
  383. result that the overall application executes much faster than it would
  384. on one individual system. Multicomputer systems have the advantage of
  385. using general purpose computers which are typically very cost effective
  386. and can continue to execute non-distributed applications as well as
  387. distributed ones. Of course, a SMP system could be one of the systems in
  388. a multicomputer environment.
  389.  
  390. [Figure 10:  Illustration:  Distributed Computing]
  391.  
  392. Summary
  393. Multiprocessing systems provide the extra levels of performance needed
  394. for demanding environments. While there are several types of
  395. multiprocessing implementations, fully symmetric multiprocessing systems
  396. offer the most balanced performance for commercial and mixed workload
  397. environments. SMP systems most fully utilize the extra performance
  398. available with additional processors. Systems such as the HP 890S
  399. provide SMP transparently to existing applications that were originally
  400. written for single processor systems. Standards development groups such
  401. as OSF will provide operating system technologies that will improve
  402. multiprocessing performance. While massively parallel systems will
  403. continue to be advanced, SMP systems with multicomputer networks will
  404. remain cost effective solutions for meeting general purpose computing
  405. needs.
  406.  
  407. Associated files: mpwp01.gal, mpwp01.plt, mpwp02.gal, mpwp02.plt,
  408.   mpwp03.gal, mpwp03.plt, mpwp04.gal, mpwp04.plt, mpwp05.gal,
  409.   mpwp05.plt, mpwp06.gal, mpwp06.plt, mpwp07.gal, mpwp07.plt,
  410.   mpwp08.gal, mpwp08.plt, mpwp09.gal, mpwp09.plt, mpwp10.gal,
  411.   mpwp10.plt,
  412. Multiprocessing White Paper
  413.